package com.shop.cereshop.business.dl.logic.service.Impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.shop.cereshop.business.dao.dl.CerePlatformUserPointDao;
import com.shop.cereshop.business.dl.logic.domian.CerePlatformUserPoint;
import com.shop.cereshop.business.dl.logic.service.UserPointsService;
import com.shop.cereshop.business.dl.logic.utils.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: dlshop
 * 描述：
 * @author: 我好帅
 * @create: 2021-07-21 10:33
 **/
@Service
public class UserPointsServiceImpl implements UserPointsService {
    @Autowired
    private CerePlatformUserPointDao cerePlatformUserPointDao;

    @Override
    public ResultInfo getAll(String phone,Integer page, Integer row) {
        PageHelper.startPage(page,row);
        List<CerePlatformUserPoint> list = cerePlatformUserPointDao.getAll(phone);
        PageInfo<CerePlatformUserPoint> pageInfo = new PageInfo<>(list);
        return new ResultInfo(pageInfo);
    }

}
